﻿using IOA.MES.Business;
using NLog;
using Quartz;
using System;
using System.Threading.Tasks;

namespace IOA.MES.AutoJobs.WmsJobs
{
    /// <summary>
    /// WMS入库作业
    /// </summary>
    public class InboundJob : IJob
    {
        private static Logger logger = LogManager.GetCurrentClassLogger();
        private readonly int loggerId = new Random().Next(0, 100);

        /// <summary>
        /// 执行作业
        /// </summary>
        public async Task Execute(IJobExecutionContext context)
        {
            try
            {
                logger.Info($"【{loggerId}】 开始执行InboundJob...");
                //new WmsMgr().ExcuteInbound();
            }
            catch (Exception ex)
            {
                logger.Fatal(ex, $"【{loggerId}】 InboundJob执行异常：{ex.Message}");
            }
            logger.Info($"【{loggerId}】 执行InboundJob完成");
        }
    }
}
